package com.zxl.live.screen.ui.dialog;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.zxl.live.screen.R;


/**
 * @author linzewu
 * @date 16-8-12
 */
public class GuideMarkDialog extends BaseDialog {
    public GuideMarkDialog(Context context) {
        super(context);
    }

    private Button mPositiveButton;
    private Button mNegativeButton;

    @Override
    protected void onTouchOutside() {
        if (mGuideDialogListener != null) {
            mGuideDialogListener.onTouchExternal();
        }
    }
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_guide_mark);
        mPositiveButton = (Button) findViewById(R.id.button_positive);
        mPositiveButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mGuideDialogListener != null) {
                    mGuideDialogListener.onConfirm();
                }
            }
        });
        mNegativeButton = (Button) findViewById(R.id.button_negative);
        mNegativeButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mGuideDialogListener != null) {
                    mGuideDialogListener.onCancel();
                }
            }
        });
    }

    private GuideDialogListener mGuideDialogListener;
    public void setGuideDialogListener(GuideDialogListener guideDialogListener) {
        this.mGuideDialogListener = guideDialogListener;
    }
}
